package function

object Set_Test {
  def main(args: Array[String]): Unit = {
    // 定义
    val set1 = Set("dfd", 2, 4, 56, "dada")
    val set4=Set("拉拉",4,55,2)
    println(set1)
    val set2=set1.+(3)
    println(set4)
    val set3=set2-"dada"
    println(set3)
    val set5=set1++set4
    println(set5)
    //并集
    val set6=set1 union set4
    println(set6)
    //差集
    val set7=set1 diff set4
    println(set7)
    //交集
    val set8=set1 intersect set4
    println(set8)

  }

}
